package com.zjp.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = false)
//@TableName("mp_user") // 表的别名
public class User extends Model<User> {
    private static final long serialVersionUID = 1L;

    // @TableId
    @TableId(type = IdType.AUTO)//数据库自增策略
    //@TableId(type = IdType.NONE)//数据库自增策略
    private Long id;
    //@TableField("user_name")
    private String name;
    private Integer age;
    private String email;
    private Long managerId;
    private LocalDateTime createTime;
    //private transient String remark;
  /*  private static String remark;

    public static String getRemark() {
        return remark;
    }

    public static void setRemark(String remark) {
        User.remark = remark;
    }*/
    /*  是否为数据库表字段
     * 默认 true 存在，false 不存在*/
    @TableField(exist = false)
    private String remark;
}
